import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'


// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  // 根据环境变量设置base路径
  const base = mode === 'wails' ? '/' : '/web'

  return {
    base,
    plugins: [vue(),tailwindcss()],
    build: {
      outDir: 'web'
    },
    resolve: {
      alias: {
        '@': '/src'
      }
    }
  }
})